package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/Qualitychecklist")
public class Qualitychecklist {

    @Autowired
    SysMenuService menuService;

    //主页面
    @RequestMapping(value = "/Qualitychecklist/{menu}")
    public String Qualitychecklist(@PathVariable("menu") String menu, Model model) {
        model.addAttribute("functions", menuService.getFunctions(menu));
        return "Qualitychecklist/Qualitychecklist";

    }

    /**
     * 跳转查看质检单明细页面(list页面的第一个查看)
     * @param sszjdid
     * @param model
     * @return
     */
    @RequestMapping(value = "qualitydetails")
    public String toChakanMx(String sszjdid,Model model){
        model.addAttribute("sszjdid",sszjdid);
        return  "Qualitychecklist/qualitydetails";
    }
    /**
     * 附件管理
     * @param sszjdid
     * @param model
     * @return
     */
    @RequestMapping(value = "jfgl")
    public String jfgl(String sszjdid,Model model){
        model.addAttribute("sszjdid",sszjdid);
        return  "Qualitychecklist/Annexmanagement";
    }
    /**
     * 跳转修改质检单明细页面(list页面的第一个查看)
     * @param sszjdid
     * @param model
     * @return
     */
    @RequestMapping(value = "modify")
    public String modify(String sszjdid,Model model){
        model.addAttribute("sszjdid",sszjdid);
        return  "Qualitychecklist/qualitymodify";
    }
    /**
     * 质量检验
     * @param sszjdid
     * @param model
     * @return
     */
    @RequestMapping(value = "Qualitytesting")
    public String Qualitytesting(String sszjdid,Model model){
        model.addAttribute("sszjdid",sszjdid);
        return  "Qualitychecklist/Qualitytesting";
    }

}